home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 13 / CU Amiga Magazine's Super CD-ROM 13 (1997)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1997-08].iso / CUCD / Graphics / irit70 / www / technion.inf < prev    next >
Text File  |  1996-01-03  |  7KB  |  171 lines

  1.         IRIT at the CS department, TECHNION, IIT
  2.         ----------------------------------------
  3.  
  4. The IRIT solid modeller is installed at the Technion as /usr/local/irit
  5. on virtually all systems.
  6.  
  7.     Several types of workstations are actively supported and these
  8. are subdirectories of /usr/local/irit. You can find under
  9. /usr/local/irit directories for indy (SGI Irix 5.0.x), sgi4d (SGI Irit
  10. 4.0.xx), sun4 (Sun SPARC) etc. In src directory the complete source tree
  11. of the solid modeller can be found. In addition, you can find under
  12. /usr/local/irit two more important directories:
  13.  
  14. data - contains a large set of models in the IRIT data file formats.
  15. docs - the Irit's Manual(s) in text, Postscript, and Latex formats.
  16.  
  17. Each of the indy/sgi4d/sun4 trees are a complete copy (actually
  18. symbolic links to) the src directory. The executables on each tree are
  19. built and saved under the appropriate name in the bin subdir. That is,
  20. the executables (==binaries) for sun SPARC can be found in
  21. /usr/local/irit/sun4/bin. Object files (.o files) are likely to be removed
  22. from the trees to preserve space but you can find the different libraries
  23. under the lib subdir. That is IRIT libraries for indy can be found in
  24. /usr/local/irit/indy/lib.
  25.  
  26.  
  27. Setting up IRIT
  28. ---------------
  29.  
  30. Add the following to .cshrc:
  31.  
  32.    set path = ($path /usr/local/irit/xxxx/bin)
  33.    setenv IRIT_PATH /usr/local/irit/xxxx/bin/
  34.    setenv IRIT_DISPLAY "x11drvs -s-"
  35.  
  36. where xxxx is either sgi4d, indy, or sun4 according to the machine type
  37. you use. You might be able to use different display devices (than x11drvs)
  38. depending upon the machine type you use. Inspect the $IRIT_PATH directory
  39. for other possible devices.
  40.  
  41. If you are using the emacs editor (if you dont, you better start because
  42. it is much more simple to use IRIT within emacs) add the following to your
  43. ~/.emacs (and then exit and reenter emacs to activate):
  44.  
  45.     ; Load IRIT package
  46.     (condition-case ()
  47.         (load (expand-file-name "/usr/local/irit/src/irit/irit"))
  48.       (error (message "Can't load irit.el")))
  49.  
  50. The irit[.el] file defines the following new emacs functions for you.
  51. Once a file with the type '.irt' is loaded, emacs shifts into IRIT mode
  52. with the following new three commands:
  53.  
  54.     M-e - Executes one line of IRIT solid modling command upto the next
  55.           semicolor (';'). The M-e binds send-line-to-irit.
  56.         M-r - Executes a whole regions of IRIT command between the cursor and
  57.               marks positions. The M-r binds send-region-to-irit.
  58.         M-s - Sends one IRIT command from the input buffer to IRIT.
  59.           M-s binds send-mini-buffer-to-irit.
  60.  
  61. It is very convenient to use IRIT within emacs to create new models, and
  62. it is the recommended way.
  63. In addition, while editing a C source file, the function
  64.  
  65.     make-irit-c-function - will request a function prototype and will
  66.           expand it into the coding style comment format that is
  67.           required in IRIT.
  68.  
  69. The source tree structure
  70. -------------------------
  71.  
  72. The src subdir (and the sgi4d/indy/sun4 which are symbolic link duplicates)
  73. contains the full set of C sources for the IRIT solid modeller. The solid
  74. modeller has several libraries, each kept in a separated directory:
  75.  
  76. amigalib - amiga specific library (not really useful here).
  77. bool_lib - Boolean operations between polyhedra models.
  78. cagd_lib - the library that deals with freeform Bezier and NURB curves
  79.        and surfaces.
  80. geom_lib - general geometry is handled here, such as bounding boxes,
  81.            convexity of polygons, etc.
  82. misc_lib - miscellaneous staff - reading configuration files, parsing command
  83.            line arguments, malloc related, low level attributes, etc.
  84. prsr_lib - handles reading and writing geometrical data from/to files.
  85.            Also handles high level (object) attributes and allocation and
  86.            IPC between the server (IRIT) and the display devices.
  87. symb_lib - symbolic manipulation of freeform curves and surfaces. This
  88.            includes sum and product of scalar curves and surfaces, curvature
  89.            analysis, offsets, morphing of surfaces, prisa (layout), etc.
  90. trim_lib - trimmed surface's library (early development).
  91. triv_lib - Freefrom trivariate functions library.
  92. xtra_lib - tools that were not written by us, yet they are public domain and
  93.            we use them in IRIT. So far it includes an SVD solver from NR.
  94. circlink - not really a library, but a single object file that forces
  95.            linkage that resolves circularities in libraries.
  96.  
  97. In addition there are several directories that include end applications
  98. that use these libraries:
  99.  
  100. grapdrvs - the display devices. There are several display devices
  101.            that might be useful for you:
  102.            x11drvs - Vanilla X11 display device.
  103.            xmtdrvs - Motif/X11 display device. Renders x11drvs almost obsolete.
  104.            xgldrvs - SGI gl display device.
  105. irit -     the solid modeller. Mainly the interpreter and interface to all
  106.        the geometric manipulation that is done in other libraries.
  107.        This directory builds the solid modeller.
  108. scripts -  contains a whole set ofirit script examples (*.irt files).
  109. illustrt - a line illustration tool.
  110. poly3d-h - a hidden line removal algorithm.
  111. poly3d-r - a simple scan converter (obsolete).
  112. iritfltr - contains a set of filters to/from the IRIT data file format to
  113.            other formats/ray tracers/postscript etc.
  114. contrib -  this directory contains a whole subtree of unsupported and related
  115.        staff.  Browse at your own risk.
  116.  
  117. Compiling with IRIT
  118. -------------------
  119.  
  120. In order to compile a program that uses IRIT you should do the
  121. following.  Copy the file /usr/local/irit/src/makeflag.unx to the
  122. current directory. At the beginning of your makefile add the line:
  123.  
  124. include makeflag.unx
  125.  
  126. The makeflag.unx defines a new rule to compile .c files to .o files
  127. with the "correct" flags. You do have to select these "correct" flags
  128. in the makeflag.unx by editing and removing the '#' comments from the
  129. appropriate selected machine. For example to use the makefile under
  130. SGI Irit 4.0 the following must be uncommented:
  131.  
  132.     #
  133.     # Flags for SGI 4d, Irix 4.0, using GL or X11:
  134.     #
  135.     CC = cc -fullwarn -woff 302,303,269,927 -xansi
  136.     DFLAGS = -DFUNCPROTO -DSTRICMP -DSGINAP -DRAND48 -DTIMES -D__UNIX__ -D__GL__ -D__X11__
  137.     # CFLAGS = -O $(DFLAGS) -Olimit 1000 -Wf,-XNh10000 -Wf,-XNd10000 -G 4
  138.     CFLAGS = -g $(DFLAGS) -Olimit 1000 -Wf,-XNh10000 -Wf,-XNd10000 -G 4
  139.     MORELIBS = -lbsd
  140.     GRAPX11LIBS = -lX11
  141.     GRAPXMTLIBS = -lXm_s -lXt_s -lX11 -lgl_s
  142.     GRAPGLLIBS = -lgl_s
  143.     GRAPDRVS = xgldrvs xgladap x11drvs xmtdrvs nuldrvs
  144.  
  145. Note that they are two options for CFLAGS, optimized (-O) and
  146. debugging (-g).
  147.  
  148. Your makefile can be very simple hereafter. For example the makefile
  149. of the poly3d-h in the IRIT itself, looks like:
  150.  
  151.     #
  152.     # Makefile for the POLY3D-H hidden line remover.
  153.     #
  154.     
  155.     include makeflag.unx
  156.     
  157.     OBJS    = out-edge.o poly3d-h.o prepdata.o
  158.     
  159.     poly3d-h:    $(OBJS)
  160.         $(CC) $(CFLAGS) -o poly3d-h $(OBJS) $(LIBS) -lm $(MORELIBS)
  161.     
  162.     install: poly3d-h
  163.         mv -f poly3d-h $(BIN_DIR)
  164.         cp poly3d-h.cfg $(BIN_DIR)
  165.     
  166.     # Dependencies starts here - do not touch, generated automatically.
  167.     out-edge.o:    program.h
  168.     poly3d-h.o:    program.h
  169.     prepdata.o:    program.h
  170.  
  171.